/* eslint-disable react-hooks/rules-of-hooks */
import { ReactComponent as Bill } from '@/assets/images/profile/Bill.svg';
import { ReactComponent as Favourite } from '@/assets/images/profile/Favourite.svg';
import { ReactComponent as Key } from '@/assets/images/profile/Key.svg';
import { ReactComponent as LogoTB } from '@/assets/images/profile/LogoTB.svg';
import { ReactComponent as Messages } from '@/assets/images/profile/Messages.svg';
import { ReactComponent as Profile } from '@/assets/images/profile/Profile.svg';
import { ReactComponent as Premium } from '@/assets/images/profile/Tag.svg';
import { ReactComponent as Logout } from '@/assets/images/shared/Logout.svg';
import { ProfileModalItem } from '@/widgets/Header/Header';
import cs from '@/widgets/Header/Header.module.scss';
import cn from 'classnames';

export const getProfileTabs = (isPremium?: boolean): ProfileModalItem[] => {
  const commonTabs = [
    {
      Logo: <Profile />,
      Component: <span className={cs.link}>Профиль</span>,
      id: 'main',
      title: 'Профиль',
    },
    {
      Logo: <LogoTB />,
      Component: <span className={cn(cs.link, cs.premium)}>Подписка {isPremium && <Premium />}</span>,
      id: 'subscription',
      title: 'Подписка',
    },
    {
      Logo: <Bill />,
      Component: <span className={cs.link}>Покупки</span>,
      id: 'purchases',
      title: 'Покупки',
    },
    {
      Logo: <Favourite />,
      Component: <span className={cs.link}>Избранное</span>,
      id: 'favorites',
      title: 'Избранное',
    },
    {
      Logo: <Key />,
      Component: <span className={cs.link}>Данные для входа</span>,
      id: 'data',
      title: 'Данные для входа',
    },
    {
      Logo: <Messages />,
      Component: <span className={cs.link}>Написать нам</span>,
      id: 'feedback',
      title: 'Написать нам',
    },
    {
      Logo: <Logout />,
      Component: <div className={cs.exit}>Выйти</div>,
      id: 'logout',
      title: 'Выйти',
    },
  ];

  return commonTabs as ProfileModalItem[];
};
